<template>
    <input type="text" v-model="cityName">
</template>
<script setup>
import { ref, watch } from 'vue'

const cityName=ref('zhejiang')
 watch(cityName, (newValue, oldValue) =>
 {
     console.log(newValue, oldValue)
 } 
 )
</script>